package com.smile.api;

import com.smile.commons.page.R;
import com.smile.model.request.GetInspectionTaskByFlightIdRequest;
import com.smile.model.response.GetInspectionTaskByFlightIdResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "smile-plus-standalone-task", contextId = "inspectionTask", path = "/api/task")
public interface InspectionTaskApi {
    @PostMapping("/inspectionTask/getInspectionTaskByFlightId")
    R<GetInspectionTaskByFlightIdResponse> getInspectionTaskByFlightId(@RequestBody GetInspectionTaskByFlightIdRequest getInspectionTaskByFlightIdRequest);

    /**
     * 更新巡检任务状态
     * @param organizationId 组织id
     * @param status 1-待执行 2-执行中 3-已取消 4-已完成
     */
    @GetMapping("/inspectionTask/updateTaskStatus")
    R<Void> updateTaskStatus(@RequestParam("organizationId") Long organizationId, @RequestParam("status") Integer status);

}
